package com.sdj.quick.web.controller;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.sdj.quick.web.dto.TradingQueryDto;

/***
 * 订单查询
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/trading")
public class TradingQueryController extends BaseController{
	
	@RequestMapping("/toTradingQuery")
	public String toTradingQuery(){
		return "tradingQuery";
	}

	
	@RequestMapping(value="/tradingQuery",method=RequestMethod.POST)
	public @ResponseBody String tradingQuery(TradingQueryDto tradingQueryDto){
		logger.info("快捷订单查询发送请求参数对象:【{}】",tradingQueryDto);
		String merKey = tradingQueryDto.getMerKey();
		String path = quickConfig.getTradingQueryUrl();
		Map<String,String> map = getPostResult(path,merKey,tradingQueryDto);
		return JSON.toJSONString(map);
	}
}
